<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxUserinfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_userinfo', function (Blueprint $table) {
            $table->increments('id')->commit('主键ID');
            $table->string('openid',100)->commit('openid');
            $table->string('nickname',30)->commit('昵称');
            $table->string('img')->commit('头像');
            $table->integer('score')->default('200')->commit('积分');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_userinfo');
    }
}
